    <?php defined('BASEPATH') OR exit('No direct script access allowed'); ?><!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/public/js/html5shiv.js"></script>
    <script type="text/javascript" src="/public/js/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/public/plugins/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/public/plugins/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/public/plugins/Hui-iconfont/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/public/plugins/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/public/plugins/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="/public/plugins/laydate/skins/default/laydate.css"/>
    <script type="text/javascript" src="/public/plugins/My97DatePicker/WdatePicker.js"></script>
    <!--[if IE 6]>
    <script type="text/javascript" src="/public/js/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>快方管理后台</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <style type="text/css">
        .date{
            width: 100px;
        }
        .table .show_count{
            text-align: right;
            padding-right: 10px;
        }
        .search{
            width: 250px;
        }
        .title{
            padding-left: 20px;
        }
        /*.size{
            font-size: 15px;
        }*/
        
    </style>
</head>
<body class="big-page">
<div class="Hui-article" style="top:0;">
    <h3 class="title">修改门店<small>&emsp;<?=$chn_name?></small></h3>
    <div class="addCategory">
        <form class="add_ctegory" id="form1">
            <table class="table table-border">
                <input type="hidden" name="store_id" value="<?=$data['store_id']?>">
                <input type="hidden" name="chn_id" value="<?=$data['chn_id']?>">
                <tr>
                    <td class="size" style="text-align: right;">门店名称：</td>
                    <td><input class="input-text radius size" type="text" name="other_shop_name" value="<?=$data['other_shop_name'] ?>"></td>
                </tr>
                <tr>
                    <td class="size" style="text-align: right;">门店广告：</td>
                    
                    <td>
                        <textarea class="size" name="other_shop_desc" rows="5" cols="150"><?=$data['other_shop_desc'] ?></textarea>
                    </td>
                </tr>
                <tr>
                    <td class="size" colspan="2">营业开始时间:&emsp;
                    <input type="text" name="start_time" onClick="WdatePicker({el:this,dateFmt:'HH:mm:ss'})" value="<?=$data['shipping_start_time'] ?>">&emsp;&emsp;
                    营业结束时间：&emsp;
                    <input type="text" name="end_time" onClick="WdatePicker({el:this,dateFmt:'HH:mm:ss'})" value="<?=$data['shipping_end_time'] ?>"></td>
                </tr>
                
                <tr>
                    <td class="size" style="text-align: right;">配送费用：</td>
                    <td><input class="input-text radius size" type="text" name="shipping_fee" value="<?=$data['shipping_fee'] ?>"></td>
                </tr>
                <tr>
                    <td class="size" style="text-align: right;">店铺状态：</td>
                    <td>
                        <?php
                            if($data['store_status'] == '0')
                            {
                                echo "休息";
                            }elseif ($data['store_status'] == 1) {
                                echo "营业";
                            }elseif ($data['store_status'] == 2) {
                                echo "下线";
                            }
                        ?>
                    </td>
                </tr>
                <tr>
                    <td class="size" style="text-align: right;">修改状态：</td>
                    <td>
                        <input class="size" type="radio" name="store_status" value="0" <?php if($data['store_status'] == '0'){echo checked; }?>>休息
                        <input class="size" type="radio" name="store_status" value="1" <?php if($data['store_status'] == 1){echo checked; }?>>营业
                        <input class="size" type="radio" name="store_status" value="2" <?php if($data['store_status'] == 2){echo checked; }?>>下线
                    </td>
                </tr>
                <tr>
                    <td class="size" colspan="2" style="text-align: center;">
                        <a class="submit_mod_store btn btn-success radius">修改</a>
                    </td>
                </tr>
            </table>
        </form>
    </div>

</div>

<script type="text/javascript" src="/public/js/jquery.min.js"></script>
<script type="text/javascript" src="/public/plugins/layer/layer.js"></script>
<script type="text/javascript" src="/public/plugins/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/public/plugins/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="/public/plugins/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript" src="/public/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/public/plugins/laydate/laydate.js"></script>
<script type="text/javascript">
    $(".submit_mod_store").bind("click", function(){
        var data = $("#form1").serialize();

        $.ajax({
            url: "/ChannelStore/updateChannelStore",
            type: "POST",
            dataType: "json",
            data: data,
            success: function(res){
                if(res.errMsg == "success"){
                    layer.alert("修改门店成功", function(){
                        window.location.reload();
                    });
                }else{
                    layer.alert(res.data.error.msg);
                }
            }
        })
        
    })

    $(".go_back").bind("click", function(){
        window.history.back();
    })
</script>
</body>
</html>
